package com.yjy.fxkj;

import com.yjy.fxkj.factory.RS485AbstractFactory;
import com.yjy.fxkj.factory.rs485.RS485Creator;
import com.yjy.fxkj.product.rs485.BatteryRS485Dev;
import com.yjy.fxkj.product.rs485.CameraRS485Dev;
import com.yjy.fxkj.product.rs485.PowerRS485Dev;

public class Client {
    public static void main(String[] args) {
        RS485AbstractFactory creator485 = new RS485Creator();

        PowerRS485Dev power485 = creator485.createPowerDev();
        CameraRS485Dev camera485 = creator485.createCameraDev();
        BatteryRS485Dev battery485 = creator485.createBatteryDev();

        System.out.println(power485.getName());
        System.out.println(camera485.getName());
        System.out.println(battery485.getName());
    }
}
